package STUDENT.TRINHQUANGXUANDUC.BASIC.CAUTRUCLAPTRINH;

import java.util.Scanner;

public class BAI6 {
	public static void main(String[] args) {
		int i, kieu;
		Scanner scanner = new Scanner(System.in);
		System.out.println("Xin moi nhap vao mot so:");
		i = scanner.nextInt();
		int e = 0;
		scanner = new Scanner(System.in);
		System.out.println("Xin moi chon kieu 1.Chan/2.Le");
		kieu = scanner.nextInt();
		if(kieu == 1) {
			System.out.println("Vong lap while");
			while (e <= i) {
				if (e % 2 == 0) {
					System.out.println("-" + e);
				}
				e++;
			}
			System.out.println("Vong lap do");
			do {
				if (e % 2 == 0) {
					System.out.println("-" + e);
				}
				e++;
			} while (e < i);
			System.out.println("Vong lap for");
			for (int j = 0; j <= i; j++) {
				if (j % 2 == 0) {
					System.out.println("-" + j);
				}
			}
		}
		else if(kieu == 2) {
			System.out.println("Vong lap while");
			while (e <= i) {
				if (e % 2 != 0) {
					System.out.println("-" + e);
				}
				e++;
			}
			System.out.println("Vong lap do");
			do {
				if (e % 2 != 0) {
					System.out.println("-" + e);
				}
				e++;
			} while (e <= i);
			System.out.println("Vong lap for");
			for (int j = 0; j <= i; j++) {
				if (j % 2 != 0) {
					System.out.println("-" + j);
				}
			}
		}
	}
}
